package olga.gorbatiuk.perdep.sorting;

/**
 * @author Olga Gorbatiuk
 */
public final class ArrayParameters {

    private final int min;
    private final int max;
    private final int size;

    /**
     * Instantiates a new array parameters.
     *
     * @param min the min
     * @param max the max
     * @param size the size
     */
    public ArrayParameters(int min, int max, int size) {
        if (min > max) {
            throw new IllegalArgumentException(
                    "Min value should be less or equals Max value");
        }
        if (size < 1) {
            throw new IllegalArgumentException("Array must not be empty");
        }
        this.min = min;
        this.max = max;
        this.size = size;
    }

    /**
     * Gets the min.
     *
     * @return the min
     */
    public int getMin() {
        return min;
    }

    /**
     * Gets the max.
     *
     * @return the max
     */
    public int getMax() {
        return max;
    }

    /**
     * Gets the size.
     *
     * @return the size
     */
    public int getSize() {
        return size;
    }
}
